{extend name="base" /} {block name="body"}
<div class="layui-body">
	<!--tab标签-->
	<div class="layui-tab layui-tab-brief">
		<ul class="layui-tab-title">
			<li class="">
				<a href="{:url('beauthome/orders')}">预定订单列表</a>
			</li>
			<li class="layui-this">预定管理</li>
		</ul>
		<div class="layui-tab-content">
			<div class="layui-tab-item layui-show">
				<form id="myform" class="layui-form form-container" action="{:url('beauthome/ordersupdate')}" method="post">
					<div class="layui-form-item">
						<label class="layui-form-label">订房编号</label>
						<div class="layui-input-block">
							<input type="text" value="{$home.home_sn}" readonly  lay-verify="required" placeholder="请输入订房编号" class="layui-input">
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">订房名称</label>
						<div class="layui-input-block">
							<input type="text" value="{$home.home_name}" readonly  lay-verify="required" placeholder="请输入订房名称" class="layui-input">
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">预定人姓名</label>
						<div class="layui-input-block">
							<input type="text" name="re_name" value="{$home.re_name}" readonly  class="layui-input">
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">预定人数</label>
						<div class="layui-input-block">
							<input type="text" name="re_people" value="{$home.re_people}" readonly  class="layui-input">
						</div>
					</div>					
					<div class="layui-form-item">
						<label class="layui-form-label">价格</label>
						<div class="layui-input-block">
							<input type="text" name="balance" value="{$home.balance}" readonly  class="layui-input">
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">状态</label>
						<div class="layui-input-block">
							 <select name="state"   class="layui-input">
						        <option value="1" {if condition="$home.state==1" } selected {/if}>已付款</option>
								<option value="2" {if condition="$home.state==2" } selected {/if}>完成</option>
								<option value="3" {if condition="$home.state==3" } selected {/if}>关闭订单</option>
								<option value="0" {if condition="$home.state==0" } selected {/if}>待付款</option>
					      	</select>
						</div>
					</div>
					<div class="layui-form-item">
						<div class="layui-input-block">
							<input type="hidden" name="id" value="{$home.id}">
							{if $home.state==1}
							<button class="layui-btn" onclick="check();"  lay-filter="*"> 确认操作</button>
							{/if}
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
</div>
{/block}
{block name="js"}
<script type="text/javascript" src="/public/static/js/image.zip.js"></script>
<script type="text/javascript" src="/public/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="/public/ueditor/ueditor.all.js"></script>

<script>
	  function check(){
	  	layer.confirm("确认当前操作", {
					icon: 3
				}, function(index) {
					$("#myform").submit();
					
				});
	  }
	var ue = UE.getEditor('content', {
        initialFrameHeight: 450,
		serverUrl: "{:url('admin/ueditor/index?cate=news')}"
	});
	var GV = {
		current_controller: "beauthome/orders"
	};

</script>
{/block}